#include <stdio.h>

int main(void)
{
	int x, y, gcd;

	printf("Input two positive integers: ");
	scanf("%d%d", &x, &y);
	if (x < y)
		gcd = x;
	else
		gcd = y;
	while (x % gcd || y % gcd)
		gcd--;

	printf("gcd = %d\n", gcd);

	return 0;
}